package com.bst.base.service.impl;

import java.util.List;

import com.bst.common.vo.DateParamVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bst.base.mapper.BaseWeatherMapper;
import com.bst.base.domain.BaseWeather;
import com.bst.base.service.IBaseWeatherService;
import com.bst.common.core.text.Convert;

/**
 * 天气Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-08
 */
@Service
public class BaseWeatherServiceImpl implements IBaseWeatherService 
{
    @Autowired
    private BaseWeatherMapper baseWeatherMapper;

    /**
     * 查询天气
     * 
     * @param dayOccur 天气主键
     * @return 天气
     */
    @Override
    public BaseWeather selectBaseWeatherByDayOccur(String dayOccur)
    {
        return baseWeatherMapper.selectBaseWeatherByDayOccur(dayOccur);
    }

    /**
     * 查询天气列表
     * 
     * @param baseWeather 天气
     * @return 天气
     */
    @Override
    public List<BaseWeather> selectBaseWeatherList(BaseWeather baseWeather)
    {
        return baseWeatherMapper.selectBaseWeatherList(baseWeather);
    }

    /**
     * 新增天气
     * 
     * @param baseWeather 天气
     * @return 结果
     */
    @Override
    public int insertBaseWeather(BaseWeather baseWeather)
    {
        return baseWeatherMapper.insertBaseWeather(baseWeather);
    }

    /**
     * 修改天气
     * 
     * @param baseWeather 天气
     * @return 结果
     */
    @Override
    public int updateBaseWeather(BaseWeather baseWeather)
    {
        return baseWeatherMapper.updateBaseWeather(baseWeather);
    }

    /**
     * 批量删除天气
     * 
     * @param dayOccurs 需要删除的天气主键
     * @return 结果
     */
    @Override
    public int deleteBaseWeatherByDayOccurs(String dayOccurs)
    {
        return baseWeatherMapper.deleteBaseWeatherByDayOccurs(Convert.toStrArray(dayOccurs));
    }

    /**
     * 删除天气信息
     * 
     * @param dayOccur 天气主键
     * @return 结果
     */
    @Override
    public int deleteBaseWeatherByDayOccur(String dayOccur)
    {
        return baseWeatherMapper.deleteBaseWeatherByDayOccur(dayOccur);
    }

    @Override
    public int insertBatchBaseWeather(List<BaseWeather> list) {
        return baseWeatherMapper.insertBatchBaseWeather(list);
    }

    @Override
    public List<BaseWeather> selectBaseWeatherListByDays(DateParamVO paramVO) {
        return baseWeatherMapper.selectBaseWeatherListByDays(paramVO);
    }
}
